<template>
  <div class="topicdetail">
    <div class="main">
      <div class="detail-content" v-html="detailInfo.content"></div>
      <div class="list-title">专题推荐</div>
      <div class="list">
        <div v-for="item in recommendList" :key="item.id" class="item">
          <img :src="item.scene_pic_url" alt="" />
          <p>{{ item.title }}</p>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { detailaction } from "@/api/topic/index";
export default {
  data() {
    return {
      detailInfo: {},
      recommendList: [],
    };
  },
  created() {
    let id = this.$route.query.id;
    detailaction({
      id,
    }).then((res) => {
      console.log(res);
      this.detailInfo = res.data.data;
      this.recommendList = res.data.recommendList;
    });
  },
};
</script>
<style lang="scss" scoped>
@import "./index.scss";
</style>

<style>
.detail-content img {
  width: 100%;
  vertical-align: middle;
}
</style>
